/*
 * @Author: your name
 * @Date: 2021-12-22 10:23:43
 * @LastEditTime: 2021-12-22 10:49:07
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \toutiao-m\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
  // 抽奖记录
  // {
  //   path: '/fulfil',
  //   name: 'fulfil',
  //   component: () => import('@/view/fulfil'),
  //   meta: {
  //     title: '满额免充'
  //   },
  // },
  // // 满额享免充
  // {
  //   path: '/chargingFree',
  //   name: 'chargingFree',
  //   component: () => import('@/view/fulfil/chargingFree'),
  //   meta: {
  //     title: '满额享免充'
  //   },
  // },
   // 登录
   {
    path: '/indexCenter',
    name: 'indexCenter',
    component: () => import('@/view/index/indexCenter'),
    meta: {
      title: '首页'
    },
  },
  // 登录
  {
    path: '/login',
    name: 'login',
    component: () => import('@/view/login/index'),
    meta: {
      title: '登录'
    },
  },
  // 首页
  {
    path: '/index',
    name: 'index',
    component: () => import('@/view/index/index'),
    meta: {
      title: '天天囤券商家平台'
    },
  },
  // 超级管理员
  {
    path: '/supertube',
    name: 'supertube',
    component: () => import('@/view/index/supertube'),
    meta: {
      title: '天天囤券商家平台'
    },
  },
  // 社长
  {
    path: '/President',
    name: 'President',
    component: () => import('@/view/index/President'),
    meta: {
      title: '天天囤券商家平台'
    },
  },
  {
    path: '/addstore',
    name: 'addstore',
    component: () => import('@/view/index/addstore'),
    meta: {
      title: '新增商家'
    },
  },
  // 超级管理员赠券
  {
    path: '/supertubedit',
    name: 'supertubedit',
    component: () => import('@/view/index/supertubedit'),
    meta: {
      title: '赠券'
    },
  },
  // 首页
  {
    path: '/record1',
    name: 'record1',
    component: () => import('@/view/record/record1'),
    meta: {
      title: '代金券余额变更记录'
    },
  },
  {
    path: '/record2',
    name: 'record2',
    component: () => import('@/view/record/record2'),
    meta: {
      title: '代金券发放记录'
    },
  },
  {
    path: '/assistant',
    name: 'assistant',
    component: () => import('@/view/record/assistant'),
    meta: {
      title: '助理管理'
    },
  },
  {
    path: '/audit',
    name: 'audit',
    component: () => import('@/view/record/audit'),
    meta: {
      title: '领券审核'
    },
  },
  
  {
    path: '/scan',
    name: 'scanCode',
    component: () => import('@/view/scanCode/index'),
    meta: {
      title: '扫码赠券'
    },
  },
  {
    path: '/qrcode',
    name: 'qrcode',
    component: () => import('@/view/record/qrcode'),
    meta: {
      title: '二维码预览'
    },
  },
  {
    path: '/qrcode1',
    name: 'qrcode1',
    component: () => import('@/view/record/qrcode1'),
    meta: {
      title: '邀请新用户'
    },
  },
  {
    path: '/vedio',
    name: 'vedio',
    component: () => import('@/view/vedio/index'),
    meta: {
      title: '新手简介'
    },
  },
  /* {
    path: '/article/:articleId',
    name: 'article',
    component: () => import('@/views/article'),
    //开启 Props 传参，说白了就是把路由参数映射到组件的 props 数据中
    props: true
  },
  {
    path: '/user/profile',
    name: 'user-profile',
    component: () => import('@/views/user-profile')
  },  */
]
const router = new VueRouter({
  routes,
  // 所有页面初始化到顶部
  scrollBehavior(to, from, savedPosition) {
    return {
      x: 0,
      y: 0
    }
  }
})
export default router